package com.kx.demo.concurrent;

import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * @author kx
 */
public class ReadWriteLockDemo {

    public static void main(String[] args) {

        ReentrantReadWriteLock lock = new ReentrantReadWriteLock();

        lock.writeLock().lock();
        lock.writeLock().unlock();



        lock.readLock().lock();
        lock.readLock().unlock();



    }

}
